import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Package from '../views/Package.vue'
import Fast from '../views/Fast'
import Fast2 from '../views/Fast/index3'
import Scroll from '../views/scroll/index'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home,
  },
  {
    path: '/package',
    name: 'Package',
    component: Package,
  },
  {
    path: '/',
    name: '首页',
    redirect: '/scroll',
  },
  {
    path: '/scroll',
    name: '滚动列表',
    component: Scroll,
  },
  {
    path: '/Fast',
    name: 'Fast',
    component: Fast,
  },
  {
    path: '/report',
    name: 'report',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/report/index.vue'),
  },
  {
    path: '/preview',
    name: 'preview',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/report/preview.vue'),
  },
  {
    path: '/fast',
    name: 'Fast',
    component: Fast2,
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/About.vue'),
  },
]

const router = new VueRouter({
  routes,
})

export default router
